package com.kgc.sbt.api;

import com.kgc.sbt.beans.*;
import com.kgc.sbt.utils.RequestResult;

import java.net.PasswordAuthentication;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface UserApi {
    /**
     * Created on 2021/8/19.
     * <p>
     * Author: 190120
     * <p>
     * Description:
     */
    //发送验证码
    RequestResult<Map<String, Object>> sendCode(String phone);

    UserLogin querByPhone(String phone);

    void insertUser(String phone, String password, String userName);

    UserLogin queryUserEntryById(Integer userId);

    boolean updatePasswordById(Integer userId, String password);

    boolean updatePhoneById(Integer userId, String newPhone);

    boolean updateUserNameById(Integer userId, String newName);

    Integer userSigned(Integer userId);

    Sign querySignByUserId(Integer userId);

    Boolean addPoints(Integer userId, Integer points);

    UserLogin queryUserByUserId(Integer userId);

    UserLogin queryByOpenId(String openId);

    boolean updateUserByPhone(String phoneNo, String openId);

    void saveToken(String token, Integer userId);

    void delToken(String token);

    Boolean queryVipByUserId(Integer userId);

    void insertVipByUserId(Integer userId);
}
